﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<kysec.RAL.EFToMySql.tb_user>" %>
<%@ Import Namespace="kysec.CR.MyUrl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>管理登录</title>

    <style type="text/css">
    body {
	    margin-left: 0px;
	    margin-top: 0px;
	    margin-right: 0px;
	    margin-bottom: 0px;
	    background-color: #016aa9;
	    overflow:hidden;
    }
    .STYLE1 {
	    color: #000000;
	    font-size: 12px;
    }    
    </style>   
    <%--<script src="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Scripts/jquery-1.4.1.min.js") %>" type="text/javascript"></script>--%>
    <script src="../../Scripts/jquery-1.4.2.js" type="text/javascript"></script>
    <script type="text/javascript">
        function userNameGetFocus() {
            $("#username").val('');
            $("#password").val('');
        }
        function mySubmit() {
            if ($("#username").val() == ' ') {
                alert("用户名不能为空！");
                return ;
            }
            if ($("#password").val() == ' ') {
                alert("密码不能为空！");
                return ;
            }
            jQuery.ajax({
                type: "post",
                url: "/Login/Login",
                data: "c_vc_userName=" + $("#username").val() + "&c_vc_passWord=" + $("#password").val() + "&c_i_pop=" + $("select[@name=pop]option[selected]").val() + "&c_b_isOnline=" + false,
                cache: false,
                success: function (result) {//处理返回的结果
                    if (result == 'False') {
                        alert("用户名或密码错误！");
                        return;
                    } else {
                        window.location.href = "/Login/Index"; //?username=" + $("#username").val(); //未处理其暴露
                        //                        window.location.replace("/Login/BackHome");
                    }

                }
            });
        }
        $(function () { javascript: window.history.forward(1); });
    </script>
</head>

<body>
  <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="962" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="235" background="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/back/images/login_03.gif") %>">&nbsp;</td>
      </tr>
      <tr>
        <td height="53"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="394" height="53" background="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/back/images/login_05.gif") %>">&nbsp;</td>
            <td width="206" background="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/back/images/login_06.gif") %>">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="16%" height="25"><div align="right"><span class="STYLE1">用户</span></div></td>
                <td width="57%" height="25"><div align="center">
                  <input type="text" id="username" onfocus="userNameGetFocus();" style="width:105px; height:17px; background-color:#292929; border:solid 1px #7dbad7; font-size:12px; color:#6cd0ff" value="admin">
                </div></td>
                <td width="27%" height="25"><div align="left"><select name="pop"  style="cursor:pointer;" title="登录权限"><option value="0">高级</option><option value="1">普通</option></select></div></td>
              </tr>
              <tr>
                <td height="25"><div align="right"><span class="STYLE1">密码</span></div></td>
                <td height="25"><div align="center">
                  <input type="password" id="password" style="width:105px; height:17px; background-color:#292929; border:solid 1px #7dbad7; font-size:12px; color:#6cd0ff" value="123456">
                </div></td>
                <td height="25"><div align="left"><img alt="" id="mysubmit" onclick="mySubmit();" style="cursor:pointer;" src="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/back/images/dl.gif") %>" width="49" height="18" border="0"></div></td>
              </tr>

            </table></td>
            <td width="362" height="53"  background="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/back/images/login_07.gif") %>">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="213" width="962" background="<%=Url.Content(kysec.CR.MyUrl.WebData.WEBURL + "/Content/back/images/login_08.gif") %>">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>